import App from './App'

// #ifndef VUE3
import Vue from 'vue'
// import './uni.promisify.adaptor'
import store from './store/index'
import tools from './common/js/tools.js'
import Ajax from './common/js/ajax.js'
import md5 from './common/js/md5.js'
import * as filters from './common/js/filters.js'
import uView from '@/uni_modules/uview-ui'
import MyMixin from './mixins/index.js'

Vue.use(uView) 
Vue.mixin(MyMixin)

Object.keys(filters).forEach(key=>{
    Vue.filter(key,filters[key])//插入过滤器名和对应方法
})

Vue.config.productionTip = false

Vue.prototype.$tools=tools
Vue.prototype.$Ajax=Ajax
Vue.prototype.$md5=md5

App.mpType = 'app'
const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif